package cn.wolfcode.trip.base.domain;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

@Getter
@Setter
@JsonIgnoreProperties("handler")
public class User extends BaseDomain {
    public static final Integer GENDER_SECRET = -1;
    public static final Integer GENDER_MAN = 0;
    public static final Integer GENDER_WOMAN = 1;
    private String email;//邮箱

    private String nickName;//昵称

    private String password;//密码

    private String place;//地区

    private String headImgUrl = "/img/user/head.jpg";//默认头像地址

    private Integer gender = GENDER_SECRET;//性别

    private String coverImgUrl = "/img/user/bg.jpeg";//默认背景图片地址

    private String sign;//签名

    private List<Travel> travels;//最近的三篇游记

    private int travelsNum;//游记总数


    public String getGenderName() {

        switch (gender) {
            case 0:
                return "女";
            case 1:
                return "男";
        }
        return "保密";
    }
    //djafsklds;

}